package eteam.aps.controller;

import eteam.aps.common.R;
import eteam.aps.common.exceptions.AuthException;
import eteam.aps.service.ProtectionOrgDtlService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 保障机构子表控制层
 *
 * @author WMT
 */
@Api(tags = "保障机构子表模块")
@RestController
public class ProtectionOrgDtlController implements IProtectionOrgDtlController {

    @Autowired
    private ProtectionOrgDtlService protectionOrgDtlService;

    @Override
    @ApiOperation("逻辑删除保障机构子表")
    @PostMapping("pod/delete/{fId}")
    public R<Integer> delete(@PathVariable String fId) throws Exception, AuthException {
        return R.success(protectionOrgDtlService.deleteByFId(fId));
    }
}
